package com.example.demo;

import org.springframework.stereotype.Component;
import tbs.framework.async.container.IAsyncTaskService;
import tbs.framework.async.notifiers.IResultNotifier;
import tbs.framework.async.task.IAsyncTask;
import tbs.framework.async.task.IResultable;
import tbs.framework.log.ILogger;
import tbs.framework.log.annotations.AutoLogger;

@Component
public class LogResultNotify implements IResultNotifier {
    @AutoLogger
    ILogger logger;

    @Override
    public void notifyResult(IResultable resultable, IAsyncTask asyncTask, IAsyncTaskService taskService) {
        logger.info("task:{} ,notifyResult:{} ", asyncTask.taskId(), resultable.getResult());
    }
}
